/**
 * ValidableAdvisor.java
 * 
 * Created on Jul 8, 2008 at 4:39:45 PM
 */
package org.lego4j;

import org.springframework.aop.Advisor;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.beans.factory.support.BeanDefinitionValidationException;

/**
 * To be implemented by {@link Advisor}s that support early validation. That is advisors that
 * can be validated before being applied to a bean through an instance of {@link ProxyFactory}.
 * 
 * For example, if an advisor matches on method annotated with some exception, the validator then could ensure 
 * the annotation has valid parameters.
 *
 * @author <a href="alexguev@gmail.com">Alexei Guevara</>
 * @version $Revision:$ updated on $Date:$ by $Author:$
 */
public interface IValidableAdvisor extends Advisor {

    /**
     * @param theBeanClass The bean class to validate.
     * @throws BeanDefinitionValidationException If the advisor can not be applied to the bean. 
     */
    public void validate( Class<?> theBeanClass ) throws BeanDefinitionValidationException;

}
